Orlando
Orlando

Reputation: 368

Netbeans PHPUnit Tests were not generated

When trying to create a test for a file with a class, I get the following error:

Tests were not generated for the following files:

myclass.php

Review the log in Output windows

When looking at Output:

Restricted access

The test class file is not created but the directory tree is.

I have noticed this happens with classes that extend another class. With classes with no extend, the test file is correctly created.

Upvotes: 2

Views: 2572

Answers (2)

seltzlab
seltzlab

Reputation: 340

Are you testing something inside Joomla? It seems the "restricted access" that Joomla says when the _JEXEC is not defined. Try to put this on top of your bootstrap file

    define('_JEXEC', 1);

Upvotes: 0

ACNB
ACNB

Reputation: 846

Check if File / Project Properties/ Test Folder is set correctly.

Upvotes: 1

Related Questions