Re: SKIPIF and include problem for an extension test with phpt
| From: | Hannes Magnusson | Date: | Mon, 13 Aug 2012 11:56:31 +0000 |
| Subject: | Re: SKIPIF and include problem for an extension test with phpt | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-66681@lists.php.net to get a copy of this message | ||
On Mon, Aug 13, 2012 at 1:35 AM, Matt Ingenthron <matt@couchbase.com> wrote:
> Hi,
>
> I have a test I'm trying to add to an extension where, if there's a local
> include file with some constants defined, I will want to run this test.
> If not, then skip the test.
>
> In the SKIPIF section, I'm trying to include something that will always be
> there and it, in turn, is trying to include another file if it exists.
> The problem I'm having is the defined(<constant>) doesn't seem to be
> returning what I expect, as even if it is defined (or should be) the test
> isn't skipped.
>
> Is there something special about includes from the SKIPIF section that
> would cause a problem here? If no, how can I diagnose what's going wrong?
> The output from the SKIPIF doesn't appear in any of the output files from
> what I can tell.
>
> The SKIPIF is here:
>
> https://github.com/ingenthr/php-ext-couchbase/blob/phpt-problem/tests/035.p
> hpt#L3
> and the include file that gets copied over and edited locally is this:
>
> https://github.com/ingenthr/php-ext-couchbase/blob/phpt-problem/tests/couch
> base.local.inc.dist
>
> Thanks in advance for any help.
if (!defined(COUCHBASE_CONFIG_HOST_ALT)) {
That should be the string, not the constant.
-Hannes