isTrue() public static method

Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
public static isTrue ( ) : PHPUnit_Framework_Constraint_IsTrue
return PHPUnit_Framework_Constraint_IsTrue
Esempio n. 1
0
/**
 * Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
 *
 * @return PHPUnit_Framework_Constraint_IsTrue
 * @since  Method available since Release 3.3.0
 */
function isTrue()
{
    return PHPUnit_Framework_Assert::isTrue();
}
Esempio n. 2
0
 /**
  * Performs validation of Symfony1 form.
  * Matches the first sfForm instance from controller and returns getErrorSchema() values.
  * Shows all errors in debug.
  */
 public function seeErrorsInForm()
 {
     $form = $this->getForm();
     if (!$form) {
         \PHPUnit_Framework_Assert::fail('as any symfony forms at all');
     }
     \PHPUnit_Framework_Assert::isTrue($form->hasErrors(), ', seems like there were no validation errors');
     foreach ($form->getErrorSchema() as $field => $desc) {
         $this->debug("Error in {$field} field: '{$desc}'");
     }
 }
Esempio n. 3
0
 public function processObjectFreeze()
 {
     PHPUnit_Framework_Assert::assertThat(true, PHPUnit_Framework_Assert::isTrue());
 }
 /**
  * @Given everyone has a plumbus in their home
  */
 public function everyoneHasAPlumbusInTheirHome()
 {
     $plumbus = (new PlumbusFactory())->make();
     $home = new Home($plumbus);
     Assert::isTrue($home->hasPlumbus());
 }