? ?
avatar wilsonge
wilsonge
30 Jan 2017

So currently the 'fixes' for AppVeyor break running phpunit on a native windows laptop. For example those toolbar things I had using PHP_EOL to run on my old laptop a few years ago (see 37031f1)

I have it in the office and am going to run tests again to see what gives. But in general we might be trading these unit tests for guaranteed failure to run phpunit on windows laptops. Thoughts @mbabker or @photodude

avatar wilsonge wilsonge - open - 30 Jan 2017
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jan 2017
avatar mbabker
mbabker - comment - 30 Jan 2017

AppVeyor is a Windows environment. There are a plethora of reasons why things could be different between it and a personal laptop (Windows build, AMP stack, etc.). So knowing what those environmental differences are would be useful.

avatar photodude
photodude - comment - 6 Feb 2017

@wilsonge did you find that windows laptop that had issues with these tests so we can compare environment details?

avatar wilsonge
wilsonge - comment - 10 Feb 2017

This is running

$ php --version
PHP 5.5.15 (cli) (built: Jul 23 2014 15:05:09)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

using Windows 10 (64bit)

There were 7 failures:

1) JHtmlBootstrapTest::testEndTabSet
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '
 </div>'

C:\Users\georg_000\Documents\Joomla\joomla-cms\tests\unit\suites\libraries\cms\html\JHtmlBootstrapTest.php:584

2) JHtmlBootstrapTest::testEndTab
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '
 </div>'

C:\Users\georg_000\Documents\Joomla\joomla-cms\tests\unit\suites\libraries\cms\html\JHtmlBootstrapTest.php:645

3) JToolbarButtonTest::testRender
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '<div class="btn-wrapper"  id="toolbar-test">
        <button onclick="if (document.adminForm.boxchecked.value == 0) { alert(Joomla.JText._('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST')); } else { Joomla.submitbutton(''); }" class="btn btn-small">
        <span class="icon-test"></span>
        </button>
 </div>
 '

C:\Users\georg_000\Documents\Joomla\joomla-cms\tests\unit\suites\libraries\cms\toolbar\JToolbarButtonTest.php:135

4) JToolbarButtonConfirmTest::testFetchButton
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '<button onclick="if (document.adminForm.boxchecked.value == 0) { alert(Joomla.JText._('JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST')); } else { if (confirm('Confirm action?')) { Joomla.submitbutton('article.save'); } }" class="btn btn-small">
        <span class="icon-confirm-test"></span>
        Confirm?</button>
 '

C:\Users\georg_000\Documents\Joomla\joomla-cms\tests\unit\suites\libraries\cms\toolbar\button\JToolbarButtonConfirmTest.php:102

5) JToolbarButtonHelpTest::testFetchButton
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '<button onclick="Joomla.popupWindow('help/en-GB/JHELP_CONTENT_ARTICLE_MANAGER.html', 'JHELP', 700, 500, 1)" rel="help" class="btn btn-small">
        <span class="icon-question-sign"></span>
        JTOOLBAR_HELP</button>
 '

C:\Users\georg_000\Documents\Joomla\joomla-cms\tests\unit\suites\libraries\cms\toolbar\button\JToolbarButtonHelpTest.php:104

6) JGithubGistsTest::testCreateGistFromFile
Expectation failed for method name is equal to <string:post> when invoked 1 time(s)
Parameter 1 for invocation JHttp::post('/gists', '{"files":{"gittest":{"content...gist"}', null, null) does not match expected value.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{"files":{"gittest":{"content":"GistContent\n"}},"public":true,"description":"This is a gist"}'
+'{"files":{"gittest":{"content":"GistContent\r\n"}},"public":true,"description":"This is a gist"}'

C:\Users\georg_000\Documents\Joomla\joomla-cms\libraries\joomla\github\package\gists.php:57
C:\Users\georg_000\Documents\Joomla\joomla-cms\tests\unit\suites\libraries\joomla\github\JGithubGistsTest.php:165

7) JGithubPackageGistsTest::testCreateGistFromFile
Expectation failed for method name is equal to <string:post> when invoked 1 time(s)
Parameter 1 for invocation JHttp::post('/gists', '{"files":{"gittest":{"content...gist"}', null, null) does not match expected value.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{"files":{"gittest":{"content":"GistContent\n"}},"public":true,"description":"This is a gist"}'
+'{"files":{"gittest":{"content":"GistContent\r\n"}},"public":true,"description":"This is a gist"}'

C:\Users\georg_000\Documents\Joomla\joomla-cms\libraries\joomla\github\package\gists.php:57
C:\Users\georg_000\Documents\Joomla\joomla-cms\tests\unit\suites\libraries\joomla\github\JGithubPackageGistsTest.php:161
avatar joomla-cms-bot joomla-cms-bot - edited - 10 Feb 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category Unit Tests
avatar joomla-cms-bot joomla-cms-bot - change - 30 Mar 2017
Title
AppVeyor vs Native Windows
AppVeyor vs Native Windows
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Apr 2017
Status New Needs Review
avatar mbabker mbabker - change - 5 Apr 2017
Labels Added: ?
avatar mbabker mbabker - labeled - 5 Apr 2017
avatar brianteeman
brianteeman - comment - 18 Aug 2017

@wilsonge @photodude Is this still an issue or has it been resolved

avatar wilsonge
wilsonge - comment - 18 Aug 2017

I don't use the windows laptop regularly (and I don't have access to it for the next week) but I have no reason to believe the situation has changed

avatar brianteeman brianteeman - change - 21 Jul 2018
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2018-07-21 22:43:47
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 21 Jul 2018

Been nearly a year and with no further updates etc I am closing this.

avatar brianteeman brianteeman - close - 21 Jul 2018

Add a Comment

Login with GitHub to post a comment