Skip to content

[8.x] Use expectNotToPerformAssertions. #39240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/Events/EventsSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,25 @@ protected function tearDown(): void

public function testEventSubscribers()
{
$this->expectNotToPerformAssertions();

$d = new Dispatcher($container = m::mock(Container::class));
$subs = m::mock(ExampleSubscriber::class);
$subs->shouldReceive('subscribe')->once()->with($d);
$container->shouldReceive('make')->once()->with(ExampleSubscriber::class)->andReturn($subs);

$d->subscribe(ExampleSubscriber::class);
$this->assertTrue(true);
}

public function testEventSubscribeCanAcceptObject()
{
$this->expectNotToPerformAssertions();

$d = new Dispatcher;
$subs = m::mock(ExampleSubscriber::class);
$subs->shouldReceive('subscribe')->once()->with($d);

$d->subscribe($subs);
$this->assertTrue(true);
}

public function testEventSubscribeCanReturnMappings()
Expand Down
8 changes: 4 additions & 4 deletions tests/Integration/Database/SchemaBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class SchemaBuilderTest extends DatabaseTestCase
{
public function testDropAllTables()
{
$this->expectNotToPerformAssertions();

Schema::create('table', function (Blueprint $table) {
$table->increments('id');
});
Expand All @@ -26,19 +28,17 @@ public function testDropAllTables()
Schema::create('table', function (Blueprint $table) {
$table->increments('id');
});

$this->assertTrue(true);
}

public function testDropAllViews()
{
$this->expectNotToPerformAssertions();

DB::statement('create view "view"("id") as select 1');

Schema::dropAllViews();

DB::statement('create view "view"("id") as select 1');

$this->assertTrue(true);
}

public function testRegisterCustomDoctrineType()
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Log/LoggingIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class LoggingIntegrationTest extends TestCase
{
public function testLoggingCanBeRunWithoutEncounteringExceptions()
{
Log::info('Hello World');
$this->expectNotToPerformAssertions();

$this->assertTrue(true);
Log::info('Hello World');
}
}
4 changes: 2 additions & 2 deletions tests/Routing/ImplicitRouteBindingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class ImplicitRouteBindingTest extends TestCase
{
public function test_it_can_resolve_the_implicit_route_bindings_for_the_given_route()
{
$this->expectNotToPerformAssertions();

$action = ['uses' => function (ImplicitRouteBindingUser $user) {
return $user;
}];
Expand All @@ -24,8 +26,6 @@ public function test_it_can_resolve_the_implicit_route_bindings_for_the_given_ro
$container = Container::getInstance();

ImplicitRouteBinding::resolveForRoute($container, $route);

$this->assertTrue(true);
}
}

Expand Down