public function testAddStyle() { $this->res->addStyle('body { background: black; }', 0, 'testAddStyle')->addStyle('body { text-color: black; }', 0, 'testAddStyle'); $smarty = CRM_Core_Smarty::singleton(); $actual = $smarty->fetch('string:{crmRegion name=testAddStyle}{/crmRegion}'); $expected = "" . "<style type=\"text/css\">\nbody { background: black; }\n</style>\n" . "<style type=\"text/css\">\nbody { text-color: black; }\n</style>\n"; $this->assertEquals($expected, $actual); }