public function testName()
 {
     $castName = 'Taro Yamada';
     $cast = new Cast();
     $cast->setName($castName);
     $this->assertEquals($castName, $cast->getName());
 }
 private static function parseStaff($item)
 {
     $crawler = new Crawler($item);
     $cast = new Cast();
     if (preg_match('/people\\/(.*?)\\/.*$/', $crawler->filter('a')->attr('href'), $castId)) {
         $cast->setId($castId[1]);
     }
     $cast->setName($crawler->filter('a')->eq(1)->text());
     $cast->setRank($crawler->filter('small')->last()->text());
     $imageUrl = $crawler->filter('img')->last()->attr('data-src');
     $imageUrl = preg_replace('/\\/r\\/.*?x.*?\\//', '/', $imageUrl);
     $imageUrl = preg_replace('/\\?s=.*$/', '', $imageUrl);
     $cast->setImage($imageUrl);
     return $cast;
 }