当我运行测试时,它在CircleCi中抱怨,但不在我的本地机器上?

时间:2016-12-09 10:32:01

标签: unit-testing testing phpunit acl circleci

我们有这个acl文件在我拥有的每个其他应用程序中都没有或没有相同。

if ( $the_query->have_posts() ) {

        while ( $the_query->have_posts() ) {

            $the_query->the_post();
            // now $query->post is WP_Post Object, use:
            // $query->post->ID, $query->post->post_title, etc.
            $title = $the_query->post->post_title;
            $id = $the_query->post->ID;
            $exam_date = get_post_meta($the_query->post->ID, 'exam_date', true);
            $exam_code = wp_get_post_terms($post->ID, 'exam_code', array("fields" => "names"));
            if($exam_code) { 
                $exam_code = $exam_code[0]; 
            } else { 
                $exam_code = ""; }
            $exam_time = wp_get_post_terms($post->ID, 'exam_time', array("fields" => "names"));
            if($exam_time) { 
                $exam_time = $exam_time[0]; 
            } else { 
                $exam_time = ""; 
            }


            echo '<tr>'; 
            echo '<td class="tg-yw4l">' . $exam_date . '</td>';
            echo '<td class="tg-yw4l">' . $exam_code . '</td>';
            echo '<td class="tg-yw4l">' . $title . '</td>';
            echo '<td class="tg-yw4l">' . $exam_time . '</td>';
            echo '<tr>';



        }
}

CircleCi正在抱怨值PSD_ALL。 这是我得到的确切信息:

  

PHP注意:使用未定义的常量EDITION_ALL - 假设   &#39; EDITION_ALL&#39;   谁能帮助我?

1 个答案:

答案 0 :(得分:0)

我在circleCi机器上使用php 5.6。在我的本地开发中我使用的是php 7.0.13。这就是为什么会发生这种情况。 我在这个问题上有点误导。对不起。