芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/apv.mgaplay.com.br/vendor/ircmaxell/security-lib/test/Unit/Core/EnumTest.php
assertTrue($obj instanceof \SecurityLib\Enum); } public function testToString() { $obj = new Enum(Enum::Value3); $this->assertEquals('3', (string) $obj); } /** * @covers SecurityLib\Core\Enum::compare * @dataProvider provideTestCompare */ public function testCompare(Enum $from, Enum $to, $expected) { $this->assertEquals($expected, $from->compare($to)); } public function testGetConstList() { $obj = new Enum(Enum::Value3); $const = $obj->getConstList(); $this->assertEquals(array( 'Value1' => 1, 'Value2' => 2, 'Value3' => 3, 'Value4' => 4, ), $const); } public function testGetConstListWithDefault() { $obj = new Enum(Enum::Value3); $const = $obj->getConstList(true); $this->assertEquals(array( '__DEFAULT' => null, 'Value1' => 1, 'Value2' => 2, 'Value3' => 3, 'Value4' => 4, ), $const); } }