Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
core
core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 234
    • Issues 234
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • hubzilla
  • corecore
  • Issues
  • #1438

Closed
Open
Opened Jan 31, 2020 by Dmitry Smirnov@onlyjob

4.6: unit tests are broken? Missing `Zotlabs/Tests`

Files in tests refer to missing Zotlabs\Tests\Unit\UnitTestCase:

$ ack Unit.UnitTestCase tests/

tests/unit/Access/AccessListTest.php
26:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/Access/PermissionLimitsTest.php
27:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/Access/PermissionRolesTest.php
26:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/Access/PermissionsTest.php
27:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/Lib/PermissionDescriptionTest.php
27:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/Photo/PhotoGdTest.php
7:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/Web/HttpSigTest.php
27:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/includes/FeedutilsTest.php
5:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/includes/LanguageTest.php
26:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/includes/MarkdownTest.php
26:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/includes/PhotodriverTest.php
6:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/includes/TextTest.php
5:use Zotlabs\Tests\Unit\UnitTestCase;

tests/unit/includes/dba/DBATest.php
26:use Zotlabs\Tests\Unit\UnitTestCase;

But there is no Tests folder in Zotlabs...

The only UnitTestCase.php is in tests/unit/UnitTestCase.php.
If this is not a mistake then how to run tests in tests/phpunit.xml with phpunit??

According to README running phpunit tests/unit/ should work but

$ phpunit tests/unit/
PHP Fatal error:  Uncaught Error: Class 'Zotlabs\Tests\Unit\UnitTestCase' not found

Also vendor/bin have no phpunit. Was it a wrapper with some undocumented custom options?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: hubzilla/core#1438