Skip to content

Commit 52efb8a

Browse files
committed
Added unit testing and fixed some container logs
1 parent 0f94a24 commit 52efb8a

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

containers/php-fpm/Dockerfile-56

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
105105
&& rm /tmp/aerospike-client-php.tar.gz \
106106
;fi
107107

108+
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
109+
rm /usr/local/etc/php/conf.d/aerospike.ini \
110+
;fi
111+
108112
#####################################
109113
# Opcache:
110114
#####################################
@@ -118,6 +122,10 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \
118122
# Copy opcache configration
119123
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
120124

125+
RUN if [ ${INSTALL_OPCACHE} = false ]; then \
126+
rm /usr/local/etc/php/conf.d/opcache.ini \
127+
;fi
128+
121129
#####################################
122130
# Codeigniter Modifications:
123131
#####################################

containers/php-fpm/Dockerfile-70

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
117117
&& rm /tmp/aerospike-client-php.tar.gz \
118118
;fi
119119

120+
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
121+
rm /usr/local/etc/php/conf.d/aerospike.ini \
122+
;fi
123+
120124
#####################################
121125
# Opcache:
122126
#####################################
@@ -129,6 +133,10 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \
129133
# Copy opcache configration
130134
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
131135

136+
RUN if [ ${INSTALL_OPCACHE} = false ]; then \
137+
rm /usr/local/etc/php/conf.d/opcache.ini \
138+
;fi
139+
132140
#####################################
133141
# Codeigniter Modifications:
134142
#####################################

src/laravel/phpunit.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
stopOnFailure="false">
1111
<testsuites>
1212
<testsuite name="Application Test Suite">
13-
<directory suffix="Test.php">./tests</directory>
13+
<directory suffix="Test.php">./src/tests/</directory>
1414
</testsuite>
1515
</testsuites>
1616
<filter>
1717
<whitelist processUncoveredFilesFromWhitelist="true">
18-
<directory suffix=".php">./app</directory>
18+
<directory suffix=".php">./src</directory>
1919
</whitelist>
2020
</filter>
2121
<php>

src/laravel/src/tests/TasksTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
class ExampleTest extends TestCase
4+
{
5+
/**
6+
* A basic functional Tasks index example.
7+
*
8+
* @return void
9+
*/
10+
public function testTasksIndexExample()
11+
{
12+
$this->visit('/tasks')
13+
->see('Tasks page');
14+
}
15+
16+
/**
17+
* A basic functional Tasks show example.
18+
*
19+
* @return void
20+
*/
21+
public function testTasksIdExample()
22+
{
23+
$this->visit('/tasks/123')
24+
->see('Task 123 page');
25+
}
26+
}

0 commit comments

Comments
 (0)