contains() public static method

Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.
public static contains ( mixed $value, boolean $checkForObjectIdentity = true, boolean $checkForNonObjectIdentity = false ) : PHPUnit_Framework_Constraint_TraversableContains
$value mixed
$checkForObjectIdentity boolean
$checkForNonObjectIdentity boolean
return PHPUnit_Framework_Constraint_TraversableContains
Ejemplo n.º 1
0
 public function testGetPhotosByTag()
 {
     $client = static::createClient();
     $client->request('GET', '/photos', array('tags' => array('Thai')), array(), array('HTTP_Accept' => 'application/json'));
     $this->assertStatusCode(Response::HTTP_OK, $client);
     $this->assertAllJsonValuesMatch($client->getResponse()->getContent(), 'photos..tags', \PHPUnit_Framework_Assert::contains('Thai'));
 }
Ejemplo n.º 2
0
/**
 * Returns a PHPUnit_Framework_Constraint_TraversableContains matcher
 * object.
 *
 * @param  mixed $value
 * @return PHPUnit_Framework_Constraint_TraversableContains
 * @since  Method available since Release 3.0.0
 */
function contains($value)
{
    return PHPUnit_Framework_Assert::contains($value);
}
Ejemplo n.º 3
0
/**
 * Returns a PHPUnit_Framework_Constraint_TraversableContains matcher
 * object.
 *
 * @param  mixed   $value
 * @param  boolean $checkForObjectIdentity
 * @return PHPUnit_Framework_Constraint_TraversableContains
 * @since  Method available since Release 3.0.0
 */
function contains($value, $checkForObjectIdentity = TRUE)
{
    return PHPUnit_Framework_Assert::contains($value, $checkForObjectIdentity);
}
Ejemplo n.º 4
0
 public function shouldNotContain($value)
 {
     Assert::assertThat($this->it, Assert::logicalNot(Assert::contains($value)));
 }