public function testCreatingEmptyWordListAndInsertingRandomProperWords() { $wordList = new WordList(); $wordList->addWord('foo'); $wordList->addWord('foo'); $wordList->addWord('bar'); $wordList->addWord('baz'); $this->assertTrue($wordList->hasWord('foo')); $this->assertTrue($wordList->hasWord('bar')); $this->assertTrue($wordList->hasWord('baz')); $this->assertFalse($wordList->hasWord('fooz')); }