Add fake sendmail script, adjust travis config to use it
This commit is contained in:
parent
edbefba3b7
commit
07f7a1bdd5
|
|
@ -11,5 +11,8 @@ before_script:
|
|||
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
|
||||
- cd test
|
||||
- cp testbootstrap-dist.php testbootstrap.php
|
||||
- mkdir -p /var/qmail/bin
|
||||
- cp fakemail.sh /var/qmail/bin/sendmail
|
||||
- cp fakemail.sh /usr/sbin/sendmail
|
||||
script:
|
||||
- phpunit phpmailerTest
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
#Fake sendmail script, adapted from:
|
||||
#https://github.com/mrded/MNPP/blob/ee64fb2a88efc70ba523b78e9ce61f9f1ed3b4a9/init/fake-sendmail.sh
|
||||
numPath="/tmp/fakemail"
|
||||
|
||||
mkdir -p $numPath
|
||||
|
||||
if [ ! -f $numPath/num ]; then
|
||||
echo "0" > $numPath/num
|
||||
fi
|
||||
num=`cat $numPath/num`
|
||||
num=$(($num + 1))
|
||||
echo $num > $numPath/num
|
||||
|
||||
name="$numPath/letter_$num.txt"
|
||||
while read line
|
||||
do
|
||||
echo $line >> $name
|
||||
done
|
||||
chmod 777 $name
|
||||
/usr/bin/true
|
||||
Loading…
Reference in New Issue