%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/hamcrest/hamcrest-php/tests/Hamcrest/Core/ |
Upload File : |
<?php
namespace Hamcrest\Core;
class AllOfTest extends \Hamcrest\AbstractMatcherTest
{
protected function createMatcher()
{
return \Hamcrest\Core\AllOf::allOf('irrelevant');
}
public function testEvaluatesToTheLogicalConjunctionOfTwoOtherMatchers()
{
assertThat('good', allOf('good', 'good'));
assertThat('good', not(allOf('bad', 'good')));
assertThat('good', not(allOf('good', 'bad')));
assertThat('good', not(allOf('bad', 'bad')));
}
public function testEvaluatesToTheLogicalConjunctionOfManyOtherMatchers()
{
assertThat('good', allOf('good', 'good', 'good', 'good', 'good'));
assertThat('good', not(allOf('good', endsWith('d'), 'bad', 'good', 'good')));
}
public function testSupportsMixedTypes()
{
$all = allOf(
equalTo(new \Hamcrest\Core\SampleBaseClass('good')),
equalTo(new \Hamcrest\Core\SampleBaseClass('good')),
equalTo(new \Hamcrest\Core\SampleSubClass('ugly'))
);
$negated = not($all);
assertThat(new \Hamcrest\Core\SampleSubClass('good'), $negated);
}
public function testHasAReadableDescription()
{
$this->assertDescription(
'("good" and "bad" and "ugly")',
allOf('good', 'bad', 'ugly')
);
}
public function testMismatchDescriptionDescribesFirstFailingMatch()
{
$this->assertMismatchDescription(
'"good" was "bad"',
allOf('bad', 'good'),
'bad'
);
}
}