Skip to content

Commit 5869750

Browse files
committed
Fix unit test for array helper
1 parent 4c5b8f8 commit 5869750

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

tests/helpers.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,9 @@ public function testDotHelperWithArrayPrototype()
237237
'returnLastStatement' => true,
238238
));
239239

240-
file_put_contents(
241-
'error.php',
242-
"<?php\n".
243-
$jsPhpize->compile('a = [1,2,3]; a.filter(function (i) { return i % 2; })')
244-
);
245-
exit;
246-
$this->assertEquals(
247-
array(1, 3),
248-
$jsPhpize->render('a = [1,2,3]; a.filter(function (i) { return i % 2; })')
240+
$this->assertSame(
241+
'1,3',
242+
implode(',', $jsPhpize->render('a = [1,2,3]; a.filter(function (i) { return i % 2; })'))
249243
);
250244
}
251245
}

0 commit comments

Comments
 (0)