PATH:
home
/
lab2454c
/
costbloc.com
/
vendor
/
hamcrest
/
hamcrest-php
/
tests
/
Hamcrest
/
Core
<?php namespace Hamcrest\Core; class EveryTest extends \Hamcrest\AbstractMatcherTest { protected function createMatcher() { return \Hamcrest\Core\Every::everyItem(anything()); } public function testIsTrueWhenEveryValueMatches() { assertThat(array('AaA', 'BaB', 'CaC'), everyItem(containsString('a'))); assertThat(array('AbA', 'BbB', 'CbC'), not(everyItem(containsString('a')))); } public function testIsAlwaysTrueForEmptyLists() { assertThat(array(), everyItem(containsString('a'))); } public function testDescribesItself() { $each = everyItem(containsString('a')); $this->assertEquals('every item is a string containing "a"', (string) $each); $this->assertMismatchDescription('an item was "BbB"', $each, array('BbB')); } }
[-] IsNotTest.php
[edit]
[-] IsSameTest.php
[edit]
[-] DescribedAsTest.php
[edit]
[+]
..
[-] IsTest.php
[edit]
[-] AnyOfTest.php
[edit]
[-] IsInstanceOfTest.php
[edit]
[-] IsAnythingTest.php
[edit]
[-] SetTest.php
[edit]
[-] IsEqualTest.php
[edit]
[-] AllOfTest.php
[edit]
[-] CombinableMatcherTest.php
[edit]
[-] IsCollectionContainingTest.php
[edit]
[-] IsIdenticalTest.php
[edit]
[-] SampleBaseClass.php
[edit]
[-] IsNullTest.php
[edit]
[-] HasToStringTest.php
[edit]
[-] EveryTest.php
[edit]
[-] SampleSubClass.php
[edit]
[-] IsTypeOfTest.php
[edit]