Ouzo\Tests\Assert::thatString PHP 메소드

thatString() 공개 정적인 메소드

Sample usage: Assert::thatString("Frodo")->startsWith("Fro")->endsWith("do")->contains("rod")->doesNotContain("fro")->hasSize(5)->matches('/Fro\w+/');
public static thatString ( string $string ) : Ouzo\Tests\StringAssert
$string string
리턴 Ouzo\Tests\StringAssert
    public static function thatString($string)
    {
        return StringAssert::that($string);
    }

Usage Example

예제 #1
0
 /**
  * @test
  */
 public function shouldBuildNotExistsClause()
 {
     // when
     $result = WhereClause::notExists(Product::where(array('name' => 'phone')));
     // then
     $this->assertEquals(array('phone'), $result->getParameters());
     Assert::thatString($result->toSql())->startsWith('NOT EXISTS (SELECT')->endsWith('FROM products WHERE name = ?)');
 }
All Usage Examples Of Ouzo\Tests\Assert::thatString