Debug unit test with strict and non-ASCCI chars

General discussion on Zend Studio

Debug unit test with strict and non-ASCCI chars

Postby larsribe on Thu Jul 27, 2017 11:38 am

Hi Zend
I have a peculiar bug.
If I make a file containing non-ASCII chars, e.g.

TestClass.php:
<?php
declare(strict_types=1);

class TestClass
{
public function test()
{
echo 'ÆØÅ'; //Danish characters
}
}

Then I can call the class from the web server without problems, I can debug the class through the web server without problems, I can run a unit test without a problem, but if I debug a unit test, I get an error:

TestClass.php line 2: strict_types declaration must be the very first statement in the script

I have tried with and without an autoloader so that seems not like being the problem. I have also tried to save the file as UTF-8 or ISO-8859-1 without any difference, so it is apparently not the UTF8 BOM.
larsribe
 
Posts: 7
Joined: Wed Sep 02, 2009 3:53 pm

Re: Debug unit test with strict and non-ASCCI chars

Postby sama4565 on Fri Jul 28, 2017 10:57 am

Unfortunately, I have the same problem as you. Hopefully one of the mods will respond with a solution. I feel like I've tried everything, though. ;/
sama4565
 
Posts: 1
Joined: Fri Jul 28, 2017 10:45 am

Re: Debug unit test with strict and non-ASCCI chars

Postby larsribe on Wed Nov 08, 2017 8:47 am

I found out that it is all kind of debugging that causes this problem, so it is the debugger - not unit testing.
Is no one else experiencing this? I'm using Mac - is that the problem?
Can Zend please try to confirm this? I'm kind of paying a lot of money each year???
to sama4565: Are you running Mac?
larsribe
 
Posts: 7
Joined: Wed Sep 02, 2009 3:53 pm


Return to Zend Studio

Who is online

Users browsing this forum: No registered users and 2 guests