assertContainsOnlyInstancesOf() public static method

Asserts that a haystack contains only instances of a given classname
public static assertContainsOnlyInstancesOf ( string $classname, array | Traversable $haystack, string $message = '' )
$classname string
$haystack array | Traversable
$message string
コード例 #1
0
ファイル: Verify.php プロジェクト: jaschweder/Verify
 public function containsOnlyInstancesOf($class)
 {
     a::assertContainsOnlyInstancesOf($class, $this->actual, $this->description);
 }
コード例 #2
0
ファイル: Expect.php プロジェクト: jasonmccreary/expect
 public function toContainInstancesOf($class)
 {
     a::assertContainsOnlyInstancesOf($class, $this->actual);
 }
コード例 #3
0
ファイル: Expect.php プロジェクト: jpkleemans/phpunit-expect
 /**
  * Expect that a haystack contains only instances of a given classname
  *
  * @param string $classname
  * @param string $message
  *
  * @return Expect
  */
 public function toContainOnlyInstancesOf($classname, $message = '')
 {
     Assert::assertContainsOnlyInstancesOf($classname, $this->value, $message);
     return $this;
 }