Substitutions = new Substitutions(); } /** * Cleans up the environment after running a test. */ protected function tearDown() { $this->Substitutions = null; parent::tearDown(); } /** * Tests Substitutions->substitute() * Substitutions->addSubstitution() * Substitutions->substituteType() */ public function testSubstitute() { $type = 'MSG'; $key = 'DMSG'; $value = 'success'; $input = 'Test: __MSG_DMSG__'; $this->Substitutions->addSubstitution($type, $key, $value); $this->assertEquals('Test: success', $this->Substitutions->substitute($input)); } }