Skip to content

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 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 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 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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy