Skip to content

Commit 6c22b05

Browse files
committed
fix some risky tests
1 parent 2ef961c commit 6c22b05

File tree

4 files changed

+20
-33
lines changed

4 files changed

+20
-33
lines changed

Tests/Templating/Helper/FormHelperDivLayoutTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,36 +131,36 @@ public static function themeInheritanceProvider()
131131

132132
public function testRange()
133133
{
134-
// No-op for forward compatibility with AbstractLayoutTest 2.8
134+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
135135
}
136136

137137
public function testRangeWithMinMaxValues()
138138
{
139-
// No-op for forward compatibility with AbstractLayoutTest 2.8
139+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
140140
}
141141

142142
public function testLabelWithoutTranslationOnButton()
143143
{
144-
// No-op for forward compatibility with AbstractLayoutTest 2.8
144+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
145145
}
146146

147147
public function testSingleChoiceWithPlaceholderWithoutTranslation()
148148
{
149-
// No-op for forward compatibility with AbstractLayoutTest 2.8
149+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
150150
}
151151

152152
public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation()
153153
{
154-
// No-op for forward compatibility with AbstractLayoutTest 2.8
154+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
155155
}
156156

157157
public function testButtonlabelWithoutTranslation()
158158
{
159-
// No-op for forward compatibility with AbstractLayoutTest 2.8
159+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
160160
}
161161

162162
public function testAttributesNotTranslatedWhenTranslationDomainIsFalse()
163163
{
164-
// No-op for forward compatibility with AbstractLayoutTest 2.8
164+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
165165
}
166166
}

Tests/Templating/Helper/FormHelperTableLayoutTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,36 +118,36 @@ protected function setTheme(FormView $view, array $themes)
118118

119119
public function testRange()
120120
{
121-
// No-op for forward compatibility with AbstractLayoutTest 2.8
121+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
122122
}
123123

124124
public function testRangeWithMinMaxValues()
125125
{
126-
// No-op for forward compatibility with AbstractLayoutTest 2.8
126+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
127127
}
128128

129129
public function testLabelWithoutTranslationOnButton()
130130
{
131-
// No-op for forward compatibility with AbstractLayoutTest 2.8
131+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
132132
}
133133

134134
public function testSingleChoiceWithPlaceholderWithoutTranslation()
135135
{
136-
// No-op for forward compatibility with AbstractLayoutTest 2.8
136+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
137137
}
138138

139139
public function testSingleChoiceExpandedWithPlaceholderWithoutTranslation()
140140
{
141-
// No-op for forward compatibility with AbstractLayoutTest 2.8
141+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
142142
}
143143

144144
public function testButtonlabelWithoutTranslation()
145145
{
146-
// No-op for forward compatibility with AbstractLayoutTest 2.8
146+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
147147
}
148148

149149
public function testAttributesNotTranslatedWhenTranslationDomainIsFalse()
150150
{
151-
// No-op for forward compatibility with AbstractLayoutTest 2.8
151+
$this->markTestIncomplete('No-op for forward compatibility with AbstractLayoutTest 2.8');
152152
}
153153
}

Tests/Templating/Helper/StopwatchHelperTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ public function testDevEnvironment()
3030
public function testProdEnvironment()
3131
{
3232
$helper = new StopwatchHelper(null);
33+
$helper->start('foo');
3334

34-
try {
35-
$helper->start('foo');
36-
} catch (\BadMethodCallException $e) {
37-
$this->fail('Assumed stopwatch is not called when not provided');
38-
}
35+
// add a dummy assertion here to satisfy PHPUnit, the only thing we want to test is that the code above
36+
// can be executed without throwing any exceptions
37+
$this->addToAssertionCount(1);
3938
}
4039
}

Tests/Templating/TemplateTest.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,9 @@ class TemplateTest extends TestCase
1919
/**
2020
* @dataProvider getTemplateToPathProvider
2121
*/
22-
public function testGetPathForTemplatesInABundle($template, $path)
22+
public function testGetPathForTemplate($template, $path)
2323
{
24-
if ($template->get('bundle')) {
25-
$this->assertEquals($template->getPath(), $path);
26-
}
27-
}
28-
29-
/**
30-
* @dataProvider getTemplateToPathProvider
31-
*/
32-
public function testGetPathForTemplatesOutOfABundle($template, $path)
33-
{
34-
if (!$template->get('bundle')) {
35-
$this->assertEquals($template->getPath(), $path);
36-
}
24+
$this->assertSame($template->getPath(), $path);
3725
}
3826

3927
public function getTemplateToPathProvider()

0 commit comments

Comments
 (0)