public function testGenerateChangedConstantOrder() { $strategy = new DefaultGeneratorStrategy(); $strategy->setConstantSortFunc(function ($a, $b) { return -1 * strcasecmp($a, $b); }); $strategy->setMethodSortFunc($func = function ($a, $b) { return strcasecmp($a->getName(), $b->getName()); }); $strategy->setPropertySortFunc($func); $this->assertEquals($this->getContent('GenerationTestClass_B.php'), $strategy->generate($this->getClass())); }