Ejemplo n.º 1
0
 public function testRemoveFirst()
 {
     $source = "Hello, is it unit test!";
     // вырезаем из начала строки
     $needle = "Hello, ";
     $result = \Cloudstash\Helper\Str::RemoveFirst($needle, $source);
     $right_result = "is it unit test!";
     $this->assertEquals($right_result, $result);
     // не выреаем из начала строки, так как данный кусок не из ее начала
     $needle = "is it unit";
     $result = \Cloudstash\Helper\Str::RemoveFirst($needle, $source);
     $this->assertEquals($source, $result);
 }