public function testReplaceAChunk() { $this->prepareTextChainForChunk(); $this->textChains->replaceAChunk("[warnings-2015-8-9]", "[danger-2015-9-9]", "avaz show miomio"); $this->assertEquals(["[danger-2015-9-9]" => "avaz show miomio", "[notice-2015-8-10]" => "notice sadkaslkda kdalsdj kjdkjn kjhf hiqowjd", "[dangerous-2015-8-11]" => "dangerous this message is pretty much dangerous for u", "[warnings-2015-8-14]" => "hasan agha gilak"], $this->textChains->getChunks()); }