Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed May 13, 2024
1 parent 22c7eea commit 8963628
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Unit/Testing/DirectoryFakeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,17 @@ public function testSetupCreatesConnectedFakeConnectionAndLdapInstance()
$this->assertInstanceOf(ConnectionFake::class, $fake);
$this->assertInstanceOf(LdapFake::class, $fake->getLdapConnection());
}

public function testTearDownFlushesContainer()
{
Container::addConnection(new Connection);

DirectoryFake::setup();

$this->assertCount(1, Container::getConnections());

DirectoryFake::tearDown();

$this->assertCount(0, Container::getConnections());
}
}

0 comments on commit 8963628

Please sign in to comment.