thephpleague / plates

Native PHP template system
https://platesphp.com
MIT License
1.47k stars 180 forks source link

PHPUnit testing failed . 7 failures and 3 risky #97

Closed okaprinarjaya closed 7 years ago

okaprinarjaya commented 9 years ago

Hi..

I want to propose some code about error handling when rendering template. So.. i follow https://github.com/thephpleague/plates/blob/master/CONTRIBUTING.md But, unfortunately when i run command ./vendor/phpunit/phpunit/phpunit i got these following error messages:

my development environment is windows 7 using git bash for windows.

There were 7 failures:

1) League\Plates\EngineTest::testGetTemplatePath Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'vfs://templates\template.php' +'vfs://templates/template.php'

D:\DocumentRoot\my-contrib\plates\tests\EngineTest.php:212

2) League\Plates\Extension\AssetTest::testCachedAssetUrl Failed asserting that false is true.

D:\DocumentRoot\my-contrib\plates\tests\Extension\AssetTest.php:40

3) League\Plates\Template\NameTest::testGetPath Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'vfs://templates\template.php' +'vfs://templates/template.php'

D:\DocumentRoot\my-contrib\plates\tests\Template\NameTest.php:67

4) League\Plates\Template\NameTest::testGetPathWithFolder Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'vfs://templates/folder\template.php' +'vfs://templates/folder/template.php'

D:\DocumentRoot\my-contrib\plates\tests\Template\NameTest.php:74

5) League\Plates\Template\NameTest::testGetPathWithFolderFallback Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'vfs://templates\fallback.php' +'vfs://templates/fallback.php'

D:\DocumentRoot\my-contrib\plates\tests\Template\NameTest.php:81

6) League\Plates\Template\TemplateTest::testGetPath Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'vfs://templates\template.php' +'vfs://templates/template.php'

D:\DocumentRoot\my-contrib\plates\tests\Template\TemplateTest.php:67

7) League\Plates\Template\TemplateTest::testRenderDoesNotExist Failed asserting that exception message 'The template "template" could not be fo und at "vfs://templates\template.php".' contains 'The template "template" could not be found at "vfs://templates/template.php".'.

FAILURES! Tests: 130, Assertions: 203, Failures: 7, Risky: 3.

okaprinarjaya commented 9 years ago

Helloooo.. where is plates folks? plates has not maintained?

reinink commented 9 years ago

Hey man, sorry for the delay. Plates is certainly maintained still, but I'm a little behind on tickets as I push to release the next version of my Glide library. I'll loop back to Plates when that is done.

These errors you are receiving must have something to do Windows paths, and more specifically the vfsStream stream wrapper, which is only used for testing. I'll have to do some digging into this. Thanks for bringing it to my attention.

reinink commented 7 years ago

The risky tests have been fixed (46778e8c5748fc2bc95887754c2a05d71b90fbae).

The tests failing on windows due to the directory separators is still being looked at (#70). Hopefully that will be fixed soon as well.

Closing this issue since these items are being handled elsewhere. Thanks for reporting! 👍

okaprinarjaya commented 7 years ago

Hi @reinink , nice to know PHP Plates still maintained.

reinink commented 7 years ago

@okaprinarjaya Absolutely! :feelsgood: