/** * Test that macros can be defined and triggered. */ public function testMacro() { Inflector::macro('caps', function ($value) { return strtoupper($value); }); $this->assertEquals('FOOBAR', Inflector::caps('foObAr')); try { Inflector::lowers('foObAr'); $this->assertTrue(false); } catch (Exception $e) { $this->assertTrue(true); } }