Skip to content
This repository was archived by the owner on Dec 7, 2019. It is now read-only.
This repository was archived by the owner on Dec 7, 2019. It is now read-only.

Test Bootstrap don't work #25

@seyfer

Description

@seyfer

Bootstrap don't work.
Linked to this issue
#19

if i run it

./vendor/bin/phpunit  --bootstrap=./module/Users/tests/bootstrap.php module/Users/tests/
PHP Fatal error:  Class 'UsersTest\Framework\TestCase' not found in /home/seyfer/www/zend2-tutorial.me/module/Users/tests/Users/SampleTest.php on line 18

Now i need include file by myself in SampleTest.php
require_once 'Framework/TestCase.php';

Ok, now it runs, but assert fails

1) UsersTest\SampleTest::testSample
Failed asserting that null is an instance of interface "Zend\Di\LocatorInterface".

/home/seyfer/www/zend2-tutorial.me/module/Users/tests/Users/SampleTest.php:22

FAILURES!                            
Tests: 1, Assertions: 1, Failures: 1.

If i run it from module tests/ folder - same errors.

So, bootstrap by default don't work like it need to work.
And after installing this ZendSkeletonModule users need to change Bootstrap for testing to something like:
https://github.com/phly/PhlySimplePage/blob/master/test/Bootstrap.php
or
https://github.com/EvanDotPro/SpeckCart/blob/master/tests/Bootstrap.php

Why not include working Bootstrap.php by default?

Like framework user, i want working solution after install SkeletonModule and just add my Test classes and run it with configuration by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions