Skip to content

Commit

Permalink
Update tests/Integration/Maker/MakeFactoryTest.php
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas PHILIPPE <[email protected]>
  • Loading branch information
tomasnorre and nikophil authored Jan 16, 2025
1 parent 0e46795 commit 51be0a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/Integration/Maker/MakeFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,17 @@ public function can_create_factory_in_test_dir_with_nested_factory_already_creat
}

$tester = $this->makeFactoryCommandTester();
$tester->execute(['class' => Contact::class, '--test' => true]);
$tester->execute(['class' => Address::class, '--test' => true]);

$tester->execute(['class' => Contact::class, '--test' => true]);

$this->assertFileExists(self::tempFile('tests/Factory/ContactFactory.php'));
$this->assertFileExists(self::tempFile('tests/Factory/AddressFactory.php'));

// here, we're faking multiple calls to `bin/console make:factory`
// so it's perfectly acceptable to manually load the newly created class
require_once self::tempFile('tests/Factory/AddressFactory.php';

Check failure on line 140 in tests/Integration/Maker/MakeFactoryTest.php

View workflow job for this annotation

GitHub Actions / Static Analysis

Syntax error, unexpected ';', expecting ')' on line 140

$tester->execute(['class' => Address::class, '--test' => true]);
}

/**
Expand Down

0 comments on commit 51be0a2

Please sign in to comment.