Changes in / [193006a:fc63b30]


Ignore:
Location:
src/webapp
Files:
16 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/webapp/build.xml

    r193006a rfc63b30  
    4444
    4545
    46         <target name="dist" depends="buildwebservice,buildwebclient">
     46        <target name="dist" depends="buildwebservice,buildwebclient,test">
    4747                <echo msg="Creating archive"/>
    4848        <!--    <tar destfile="${builddir}/..//gnuboat-webapp.tar.gz" compression="gzip">
    … …  
    5858        </target>
    5959
    60         <!-- <phpunit bootstrap="webservice/inc/autoloader.php" pharlocation="phpunit-4.8.9.phar" haltonfailure="true" haltonerror="true" printsummary="true">
    61                 <formatter type="plain" usefile="false"/>
    62                 <batchtest>
    63                         <fileset dir="webservice">
    64                                 <include name="tests/ServiceTest.php"/>
    65                         </fileset>
    66                 </batchtest>
    67         </phpunit> -->
     60        <target name="test">
     61                <phpunit bootstrap="webservice/inc/autoloader.php" pharlocation="phpunit-4.8.9.phar" haltonfailure="true" haltonerror="true" printsummary="true">
     62                        <formatter type="plain" usefile="false"/>
     63                        <batchtest>
     64                                <fileset dir="webservice">
     65                                        <include name="tests/*Test.php"/>
     66                                </fileset>
     67                        </batchtest>
     68                </phpunit>
     69        </target>
    6870</project>
  • src/webapp/webservice/inc/autoloader.php

    r193006a rfc63b30  
    2525}
    2626
     27function canClassBeLoaded($class) {
     28        $parts = explode('\\', $class);
     29        $fileName = __DIR__ ."/". join("/", $parts) .".php";
     30        return file_exists($fileName);
     31}
     32
    2733spl_autoload_register("gnuboatAutoloader");
    2834
  • src/webapp/webservice/tests/ServiceTest.php

    r193006a rfc63b30  
    2525final class ServiceTest extends PHPUnit_Framework_TestCase
    2626{
    27         /**
    28           * @runInSeparateProcess
    29           */
    3027        public function testData()
    3128        {
    … …  
    3633        }
    3734
    38         /**
    39           * @runInSeparateProcess
    40           */
    4135        public function testLogFiles()
    4236        {
    … …  
    4741        }
    4842       
    49         /**
    50           * @runInSeparateProcess
    51           */
    5243        public function testShutdown()
    5344        {
    … …  
    5849        }
    5950       
    60         /**
    61           * @runInSeparateProcess
    62           */
    6351        public function testMap()
    6452        {
Note: See TracChangeset for help on using the changeset viewer.