File tree Expand file tree Collapse file tree 6 files changed +8
-18
lines changed
Expand file tree Collapse file tree 6 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,10 @@ protected function setUp(): void
3232 $ this ->preventSavingStacheItemsToDisk ();
3333 }
3434
35- Version::shouldReceive ('get ' )->zeroOrMoreTimes ()->andReturn (Composer::create (__DIR__ .'/../ ' )->installedVersion (Statamic::PACKAGE ));
36- $ this ->addToAssertionCount (-1 );
35+ Version::shouldReceive ('get ' )->andReturn (Composer::create (__DIR__ .'/../ ' )->installedVersion (Statamic::PACKAGE ));
3736
38- \Statamic \Facades \CP \Nav::shouldReceive ('build ' )->zeroOrMoreTimes ()->andReturn (collect ());
39- \Statamic \Facades \CP \Nav::shouldReceive ('clearCachedUrls ' )->zeroOrMoreTimes ();
40- $ this ->addToAssertionCount (-2 ); // Dont want to assert this
37+ \Statamic \Facades \CP \Nav::shouldReceive ('build ' )->andReturn (collect ());
38+ \Statamic \Facades \CP \Nav::shouldReceive ('clearCachedUrls ' );
4139 }
4240
4341 protected function tearDown (): void
Original file line number Diff line number Diff line change 1717use Statamic \Facades \Blueprint ;
1818use Statamic \Facades \Cascade ;
1919use Statamic \Facades \Collection ;
20- use Statamic \Facades \Entry ;
2120use Statamic \Facades \User ;
2221use Statamic \Tags \Tags ;
2322use Statamic \View \Antlers \Language \Utilities \StringUtilities ;
@@ -38,8 +37,7 @@ public function setUp(): void
3837
3938 private function withStandardBlueprints ()
4039 {
41- $ this ->addToAssertionCount (-1 );
42- Blueprint::shouldReceive ('in ' )->withAnyArgs ()->zeroOrMoreTimes ()->andReturn (collect ([new \Statamic \Fields \Blueprint ]));
40+ Blueprint::shouldReceive ('in ' )->withAnyArgs ()->andReturn (collect ([new \Statamic \Fields \Blueprint ]));
4341 }
4442
4543 #[Test]
Original file line number Diff line number Diff line change @@ -14,9 +14,7 @@ class AddonLicenseTest extends TestCase
1414 protected function license ($ response = [])
1515 {
1616 Addon::shouldReceive ('get ' )->with ('test/addon ' )
17- ->zeroOrMoreTimes ()
1817 ->andReturn (new FakeAddonLicenseAddon ('Test Addon ' , '1.2.3 ' , 'rad ' ));
19- $ this ->addToAssertionCount (-1 ); // dont need to assert this.
2018
2119 return new AddonLicense ('test/addon ' , $ response );
2220 }
Original file line number Diff line number Diff line change @@ -191,8 +191,7 @@ private function managerWithResponse(array $response)
191191 {
192192 $ outpost = $ this ->mock (Outpost::class);
193193
194- $ this ->addToAssertionCount (-1 ); // Dont want to assert this
195- $ outpost ->shouldReceive ('response ' )->zeroOrMoreTimes ()->andReturn ($ response );
194+ $ outpost ->shouldReceive ('response ' )->andReturn ($ response );
196195
197196 return new LicenseManager ($ outpost );
198197 }
Original file line number Diff line number Diff line change @@ -105,7 +105,6 @@ public function parser_instances_can_be_saved_and_retrieved()
105105 #[Test]
106106 public function it_throws_an_exception_if_extending_without_returning_a_parser ()
107107 {
108- $ this ->expectNotToPerformAssertions ();
109108 $ this ->expectException (UnexpectedValueException::class);
110109 $ this ->expectExceptionMessage ('A [ ' .Markdown \Parser::class.'] instance is expected. ' );
111110
Original file line number Diff line number Diff line change @@ -32,14 +32,12 @@ protected function setUp(): void
3232 }
3333
3434 if ($ this ->shouldFakeVersion ) {
35- \Facades \Statamic \Version::shouldReceive ('get ' )->zeroOrMoreTimes ()->andReturn ('3.0.0-testing ' );
36- $ this ->addToAssertionCount (-1 ); // Dont want to assert this
35+ \Facades \Statamic \Version::shouldReceive ('get ' )->andReturn ('3.0.0-testing ' );
3736 }
3837
3938 if ($ this ->shouldPreventNavBeingBuilt ) {
40- \Statamic \Facades \CP \Nav::shouldReceive ('build ' )->zeroOrMoreTimes ()->andReturn (collect ());
41- \Statamic \Facades \CP \Nav::shouldReceive ('clearCachedUrls ' )->zeroOrMoreTimes ();
42- $ this ->addToAssertionCount (-2 ); // Dont want to assert this
39+ \Statamic \Facades \CP \Nav::shouldReceive ('build ' )->andReturn (collect ());
40+ \Statamic \Facades \CP \Nav::shouldReceive ('clearCachedUrls ' );
4341 }
4442
4543 $ this ->addGqlMacros ();
You can’t perform that action at this time.
0 commit comments