Пример #1
0
 /**
  * @param mixed $id
  *
  * @throws IdentifierArgumentIsNotScalar
  */
 protected function guardType($id)
 {
     if (!Str::isValid($id)) {
         throw new IdentifierArgumentIsNotScalar(gettype($id));
     }
 }
Пример #2
0
 /**
  * @dataProvider splitStringProvider
  */
 public function testGetWords($string, array $expected_words)
 {
     $str = new Str($string);
     $this->assertEquals($expected_words, $str->getWords());
 }