Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18465 > unrolled thread

define constants in the phpunit.xml.dist file

Started byalex <1j9448a02@lnx159sneakemail.com.invalid>
First post2020-12-21 09:54 +0100
Last post2022-08-27 02:16 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.lang.php


Contents

  define constants in the phpunit.xml.dist file alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-21 09:54 +0100
    Re: define constants in the phpunit.xml.dist file Kristjan Robam <he1983912@aol.com> - 2022-08-27 02:16 -0700

#18465 — define constants in the phpunit.xml.dist file

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-12-21 09:54 +0100
Subjectdefine constants in the phpunit.xml.dist file
Message-ID<rrpns3$pdv$1@gioia.aioe.org>
+ cd /tmp/test
+ cat composer.json
{
     "require-dev": {
         "phpunit/phpunit": "^9.5"
     }
}
+ cat phpunit.xml.dist
<phpunit bootstrap="bootstrap.php">
     <php>
         <const name="PHPUNIT_BOOL" value="true"/>
         <const name="PHPUNIT_STRING" value="__DIR__"/>
     </php>
</phpunit>
+ cat bootstrap.php
<?php
var_dump(
     PHPUNIT_BOOL,
     PHPUNIT_STRING,
);
+ vendor/bin/phpunit
/tmp/test/bootstrap.php:4:
bool(true)
/tmp/test/bootstrap.php:4:
string(7) "__DIR__"

However I would like that instead of__DIR__, is displayed /tmp/test.

Specifically, it appears that the constant PHPUNIT_STRING is not 
evaluated as I would like.
Instead with the constant PHPUNIT_BOOL the result is OK.

There is a solution?

[toc] | [next] | [standalone]


#19077

FromKristjan Robam <he1983912@aol.com>
Date2022-08-27 02:16 -0700
Message-ID<39d1f6eb-a035-4ff2-97e6-08ceb4b62d6en@googlegroups.com>
In reply to#18465
Take a look at this ---------------->
https://groups.google.com/g/sci.physics/c/agHldfYMuRk
This is something interesting.....

πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚πŸ™‚

alex kirjutas EsmaspΓ€ev, 21. detsember 2020 kl 10:54:36 UTC+2:
> + cd /tmp/test 
> + cat composer.json 
> { 
> "require-dev": { 
> "phpunit/phpunit": "^9.5" 
> } 
> } 
> + cat phpunit.xml.dist 
> <phpunit bootstrap="bootstrap.php"> 
> <php> 
> <const name="PHPUNIT_BOOL" value="true"/> 
> <const name="PHPUNIT_STRING" value="__DIR__"/> 
> </php> 
> </phpunit> 
> + cat bootstrap.php 
> <?php 
> var_dump( 
> PHPUNIT_BOOL, 
> PHPUNIT_STRING, 
> ); 
> + vendor/bin/phpunit 
> /tmp/test/bootstrap.php:4: 
> bool(true) 
> /tmp/test/bootstrap.php:4: 
> string(7) "__DIR__" 
> 
> However I would like that instead of__DIR__, is displayed /tmp/test. 
> 
> Specifically, it appears that the constant PHPUNIT_STRING is not 
> evaluated as I would like. 
> Instead with the constant PHPUNIT_BOOL the result is OK. 
> 
> There is a solution?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web