File tree Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " marc-mabe/php-enum" ,
3
+ "description" : " Enumerations for PHP 5 (without SplEnum)" ,
4
+ "type" : " library" ,
5
+ "keywords" : [
6
+ " enum"
7
+ ],
8
+ "homepage" : " http://www.marc-bennewitz.de/" ,
9
+ "license" : " BSD-3-Clause" ,
10
+ "require" : {
11
+ "php" : " >=5.0.0" ,
12
+ "ext-reflection" : " *"
13
+ },
14
+ "autoload" : {
15
+ "psr-0" : {
16
+ "Mabe_" : " src/" ,
17
+ "MabeTest_" : " tests/"
18
+ }
19
+ }
20
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * TODO: description
3
+ * Class to implement enumerations for PHP 5 (without SplEnum)
4
4
*
5
5
* @link http://github.com/marc-mabe/php-enum for the canonical source repository
6
6
* @copyright Copyright (c) 2012 Marc Bennewitz
7
7
* @license http://github.com/marc-mabe/php-enum/blob/master/LICENSE.txt New BSD License
8
8
*/
9
9
10
- abstract class Enum
10
+ abstract class Mabe_Enum
11
11
{
12
12
/**
13
13
* The current selected value
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * TODO: description
3
+ * Unit tests for the class Mabe_Enum
4
4
*
5
5
* @link http://github.com/marc-mabe/php-enum for the canonical source repository
6
6
* @copyright Copyright (c) 2012 Marc Bennewitz
16
16
exit (1 );
17
17
}
18
18
19
- require_once dirname (__FILE__ ) . '/../src/Enum.php ' ;
19
+ require_once dirname (__FILE__ ) . '/../../ src/Mabe /Enum.php ' ;
20
20
21
- class EnumTest extends PHPUnit_Framework_TestCase
21
+ class MabeTest_EnumTest extends PHPUnit_Framework_TestCase
22
22
{
23
23
24
24
public function testEnumWithDefaultValue ()
@@ -98,26 +98,26 @@ public function testSetValueThrowsInvalidArgumentExceptionOnStrictComparison()
98
98
99
99
}
100
100
101
- class EnumWithDefaultValue extends Enum
101
+ class EnumWithDefaultValue extends Mabe_Enum
102
102
{
103
103
const ONE = 1 ;
104
104
const TWO = 2 ;
105
105
protected $ value = 1 ;
106
106
}
107
107
108
- class EnumWithNullAsDefaultValue extends Enum
108
+ class EnumWithNullAsDefaultValue extends Mabe_Enum
109
109
{
110
110
const NONE = null ;
111
111
const ONE = 1 ;
112
112
const TWO = 2 ;
113
113
}
114
114
115
115
116
- class EnumWithoutDefaultValue extends Enum
116
+ class EnumWithoutDefaultValue extends Mabe_Enum
117
117
{
118
118
const ONE = 1 ;
119
119
const TWO = 2 ;
120
120
}
121
121
122
- class EmptyEnum extends Enum
122
+ class EmptyEnum extends Mabe_Enum
123
123
{}
You can’t perform that action at this time.
0 commit comments