Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix unused variable warning #16498

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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
changes requested by nicolas-grekas
  • Loading branch information
Michal Piotrowski committed Nov 9, 2015
commit 309c08aa5c6978bb6a4be3b6b7a521dae1d1da49
1 change: 0 additions & 1 deletion 1 composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"psr-4": {
"Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/",
"Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/",
"Symfony\\Bridge\\PhpUnit\\": "src/Symfony/Bridge/PhpUnit/",
"Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",
"Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/",
"Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/",
Expand Down
1 change: 0 additions & 1 deletion 1 phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<directory>./src/Symfony/Bundle/*/Resources</directory>
<directory>./src/Symfony/Component/*/Resources</directory>
<directory>./src/Symfony/Component/*/*/Resources</directory>
<file>./src/Symfony/Bridge/PhpUnit/bootstrap.php</file>
</exclude>
</whitelist>
</filter>
Expand Down
14 changes: 12 additions & 2 deletions 14 src/Symfony/Bridge/PhpUnit/Tests/ClockMockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,22 @@ public function testTime()

public function testSleep()
{
$this->assertEquals(0, ClockMock::sleep(0));
$sleep = 10000;
$t1 = ClockMock::time();
$this->assertEquals(0, ClockMock::sleep($sleep));
$t2 = ClockMock::time();

$this->assertLessThanOrEqual($sleep, $t2 - $t1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertSame should work and is more strict thus better, isn't it?

}

public function testUsleep()
{
$this->assertNull(ClockMock::usleep(0));
$sleep = 1000000;
$t1 = ClockMock::time();
$this->assertNull(ClockMock::usleep($sleep));
$t2 = ClockMock::time();

$this->assertLessThanOrEqual($sleep / 1000000, $t2 - $t1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertSame

}

public function testMicrotimeTrue()
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.