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