1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<?php
namespace Hamcrest\Core;
class IsAnythingTest extends \Hamcrest\AbstractMatcherTestCase
{
protected function createMatcher()
{
return \Hamcrest\Core\IsAnything::anything();
}
public function testAlwaysEvaluatesToTrue()
{
assertThat(null, anything());
assertThat(new \stdClass(), anything());
assertThat('hi', anything());
}
public function testHasUsefulDefaultDescription()
{
$this->assertDescription('ANYTHING', anything());
}
public function testCanOverrideDescription()
{
$description = 'description';
$this->assertDescription($description, anything($description));
}
}
|