Debug unit test with strict and non-ASCCI chars

General discussion on Zend Studio
Post Reply
larsribe
Posts: 9
Joined: Wed Sep 02, 2009 3:53 pm

Debug unit test with strict and non-ASCCI chars

Post by larsribe » 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.

sama4565
Posts: 1
Joined: Fri Jul 28, 2017 10:45 am
Contact:

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

Post by sama4565 » 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. ;/

larsribe
Posts: 9
Joined: Wed Sep 02, 2009 3:53 pm

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

Post by larsribe » 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?

User avatar
zvika
Zend Global Support
Posts: 997
Joined: Sun Dec 14, 2008 9:48 am
Contact:

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

Post by zvika » Sun Jan 07, 2018 2:26 pm

There is a newer topic/thread here: http://forums.zend.com/viewtopic.php?f=8&t=133878
Zvika Dror
Zend Support Team

Post Reply