Skip to content

Commit ca0b070

Browse files
committed
issue #4 - update unit tests
1 parent c407546 commit ca0b070

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

tests/Element/PhpAnnotationBlockTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function testAddChildContentOk()
153153
*/
154154
public function testGetConstructWithException()
155155
{
156-
$annotationBlock = new PhpAnnotationBlock(array(
156+
new PhpAnnotationBlock(array(
157157
new PhpFunction('Bar'),
158158
));
159159
}

tests/Element/PhpClassTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,13 @@ public function testSetAbstract()
137137
$class->setAbstract(1);
138138
}
139139

140-
/**
141-
* @expectedException InvalidArgumentException
142-
*/
143140
public function testSetExtends()
144141
{
145142
$class = new PhpClass('Foo');
146143

147144
$class->setExtends('Partagé');
148145
}
149146

150-
/**
151-
* @expectedException InvalidArgumentException
152-
*/
153147
public function testSetInterfaces()
154148
{
155149
$class = new PhpClass('Foo');

tests/Element/PhpFunctionParameterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public function testTypeIsValid()
3030
$this->assertTrue(PhpFunctionParameter::typeIsValid('string'));
3131
}
3232

33-
public function testTypeIsValidFalse()
33+
public function testTypeIsValidAccentuated()
3434
{
35-
$this->assertFalse(PhpFunctionParameter::typeIsValid('Partagé'));
35+
$this->assertTrue(PhpFunctionParameter::typeIsValid('Partagé'));
3636
}
3737

3838
public function testSetTypeForDeclaration()

tests/Element/PhpFunctionTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ public function testSetParameters()
5050
));
5151
}
5252

53-
/**
54-
* @expectedException InvalidArgumentException
55-
*/
5653
public function testSetName()
5754
{
5855
$function = new PhpFunction('foo', array());

tests/Element/PhpVariableTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,17 @@ public function testToStringFloatValue()
110110

111111
$this->assertSame('$foo = 0.4;', $variable->toString());
112112
}
113+
114+
public function testCyrillic()
115+
{
116+
$variable = new PhpVariable('КонтактнаяИнформация', 0.4);
117+
118+
$this->assertSame('$КонтактнаяИнформация = 0.4;', $variable->toString());
119+
}
120+
121+
public function testé()
122+
{
123+
$é = 4;
124+
$this->assertEquals(4, $é);
125+
}
113126
}

0 commit comments

Comments
 (0)