/** * @expectedException \Drift\Types\TypeException * @expectedExceptionMessage Unknown config "foo" specified for type "int" */ public function testExceptionForUnknownTypeOption() { $this->reader->expects($this->once())->method('getProperties')->willReturn(['duration' => ['field' => 'duration', 'type' => 'int', 'options' => ['foo' => 'bar']]]); $this->mapper->setData(['duration' => 90]); $this->mapper->instantiate(Movie::class); }
public function testSpecForSingleLineComment() { $spec = $this->reader->getProperties(Movie::class)['rating']; $this->assertEquals('film_rating', $spec['field']); $this->assertEquals('-', $spec['options']['delimiter']); }