/** * @dataProvider inputUrbanWords */ public function testUrbanWordCreation($slang, $description, $sampleSentence) { $urbanword = new UrbanWord($slang, $description, $sampleSentence); $this->assertEquals($slang, $urbanword->getSlang()); $this->assertEquals($description, $urbanword->getDescription()); $this->assertEquals($sampleSentence, $urbanword->getSampleSentence()); }
/** * Adds a new word Using An Array. * * @param Pyjac\UrbanDictionary\UrbanWord $word * * @throws Pyjac\UrbanDictionary\Exception\UrbanWordAlreadyExistException * * @return true */ public function addUrbanWordObject(UrbanWord $word) { return $this->add($word->getSlang(), $word->toArray()); }