Giter Site home page Giter Site logo

Comments (7)

sebastianbergmann avatar sebastianbergmann commented on July 23, 2024 2

Duplicate of #30.

from comparator.

rajesh2k8 avatar rajesh2k8 commented on July 23, 2024 1

Hello Friends,

I am tried to do write some phpunit test cases in zend framework2.
When run the phpunit command and I am getting below errors:

PHP Fatal error: Declaration of PHPUnit_Framework_Comparator_DOMDocument::assertEquals($expected, $actual, $delta = 0, $canonicalize = false, $ignoreCase = false) must be compatible with PHPUnit_Framework_Comparator_Object::assertEquals($expected, $actual, $delta = 0, $canonicalize = false, $ignoreCase = false, array &$processed = Array) in C:\xampp\php\pear\PHPUnit\Framework\Comparator\DOMDocument.php on line 114

Fatal error: Declaration of PHPUnit_Framework_Comparator_DOMDocument::assertEquals($expected, $actual, $delta = 0, $canonicalize = false, $ignoreCase = false) must be compatible with PHPUnit_Framework_Comparator_Object::assertEquals($expected, $actual, $delta = 0, $canonicalize = false, $ignoreCase = false, array &$processed = Array) in C:\xampp\php\pear\PHPUnit\Framework\Comparator\DOMDocument.php on line 114

I did not get any solutions for same.
My controller code below:

setApplicationConfig( include './config/application.config.php' ); parent::setUp(); } public function testIndexActionCanBeAccessed() { $this->dispatch('/users'); $this->assertResponseStatusCode(200); $this->assertModuleName('Album'); $this->assertControllerName('Album\Controller\Album'); $this->assertControllerClass('AlbumController'); $this->assertMatchedRouteName('album'); } } ?>

Please help me. Thanks!

from comparator.

matthewjohnson2821 avatar matthewjohnson2821 commented on July 23, 2024 1

Same issue. Please help!!

from comparator.

claudiopro avatar claudiopro commented on July 23, 2024

Oh sorry, I couldn't find an issue in the queue so I opened it 😊 Thanks, I'll update to latest!

from comparator.

rajesh2k8 avatar rajesh2k8 commented on July 23, 2024

Please check your Zend version, Basically, I have the issue but due to some Zend framework version. Mistakenly I have installed Zend 3 framework and PHPUnit test cases written in Zend 2 framework.
Please once check. I hope your problem will get resolved.

While install the Zend framework give forcefully Zend version name so that you will get install exact version whatever you want.

Thanks

from comparator.

baspeeters avatar baspeeters commented on July 23, 2024

Just ran into this issue in Symfony 4.3 while using persist() on an ObjectManager instance.

from comparator.

MarcoConsiglio-Wichee avatar MarcoConsiglio-Wichee commented on July 23, 2024

I found this error writing an assertion in a test;

// Represent a Ticket through a custom class.
$ticket = new Ticket;
// Represent a Ticket through SimpleXMLElement.
$xml = new SimpleXMLElement("/path/to/xml");

// Put equal values in $ticket and $xml.

// Both the operand are string for sure.
$this->assertEquals($ticket->assigned_user_id, $xml->AssignedUserID);

I hope this can help to investigate the issue.

from comparator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.