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