Jump to:

23546 Posts in 19335 Topics by 2889 members

General Questions

SilverStripe Forums » General Questions » PhpUnit vs sake test behaviour

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 302 Views
  • alvonso
    Community Member
    6 Posts

    PhpUnit vs sake test behaviour Link to this post

    Hi everybody,

    I would like to run unit test via phpunit as described here:

    Running Test with phpunit and sake seems to behave differently.
    Some test pass in sake but don't in phpunit.

    For example phpunit sapphire/tests/SiteTreeBacklinksTest.php
    results in ...FFF and a
    Fatal error: Call to a member function obj() on a non-object in .../sapphire/tests/SiteTreeBacklinksTest.php on line 227

    sake dev/tests/SiteTreeBacklinksTest
    results in .......

    This behavior occures with multiple files. They pass in sake but fail in phpunit.

    I'm running SS 2.4.5 and
    PHPUnit 3.5.14

    Any ideas how I could get the tests to pass with PHPUnit.


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.