Skip to content

Commit 350897e

Browse files
00
1 parent 684e84d commit 350897e

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ RUN apt-get update \
88
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
99
&& rm -rf /var/lib/apt/lists/*
1010

11+
RUN ( pecl install -f xdebug-2.7.2 || pecl install -f xdebug-2.5.5 ) && docker-php-ext-enable xdebug
12+
1113
WORKDIR /app

bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ function imap_mail($to, $subject, $message, $additionalHeaders = null, $cc = nul
10391039
if (!function_exists('imap2_mail')) {
10401040
function imap2_mail($to, $subject, $message, $additionalHeaders = null, $cc = null, $bcc = null, $returnPath = null)
10411041
{
1042-
if (IMAP2_RETROFIT_MODE && is_resource($imap) && get_resource_type($imap) == 'imap') {
1042+
if (IMAP2_RETROFIT_MODE) {
10431043
return imap_mail($to, $subject, $message, $additionalHeaders, $cc, $bcc, $returnPath);
10441044
}
10451045

tests/SignaturesTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class SignaturesTest extends ImapTestCase
8585
'utf8',
8686
];
8787

88-
public function testFunctions()
88+
public function testFunctionsDeep()
8989
{
9090
foreach ($this->functions as $function) {
9191
$function1 = new \ReflectionFunction('imap_'.$function);
@@ -101,21 +101,20 @@ public function testFunctions()
101101
}
102102
}
103103

104-
public function testInputOutput()
104+
public function testInputOutputDeep()
105105
{
106106
$inputs = json_decode(file_get_contents('tests/fixtures/inputs.json'), true);
107-
108107
foreach ($this->functions as $function) {
109108
$parameters = $inputs[$function] ?? array_map(
110109
function($parameter) use ($function) { return $parameter->name; },
111110
(new \ReflectionFunction('imap2_'.$function))->getParameters()
112111
);
113112

114113
#var_dump($function);
115-
$output1 = call_user_func_array('imap_'.$function, $parameters);
116-
$output2 = call_user_func_array('imap2_'.$function, $parameters);
114+
$output1 = @call_user_func_array('imap_'.$function, $parameters);
115+
$output2 = @call_user_func_array('imap2_'.$function, $parameters);
117116

118-
$this->assertEquals($output1, $output2);
117+
$this->assertEquals($output1, $output2, 'Problem with function imap_'.$function);
119118
}
120119
}
121120
}

0 commit comments

Comments
 (0)