首页 \ 问答 \ 在phpunit.xml中更改php.ini配置选项(Changing php.ini configuration option in phpunit.xml)

在phpunit.xml中更改php.ini配置选项(Changing php.ini configuration option in phpunit.xml)

我正在尝试运行PHPUnit测试,并且需要将short_open_tag php.ini设置更改为On

PHPUnit手册之后 ,我在我的phpunit.xml配置文件中有这个:

<phpunit>
    <php>
        <ini name='short_open_tag' value='On' />
    </php>

    ...
</phpunit>

但是这不会覆盖正在使用的php.ini文件中的设置(设置为'Off')。 如果我进入该文件并手动将值更改为“打开”,则可以正常工作。 但是,我想单独保留该设置,只为PHPUnit测试更改它。

我最好的猜测:我的应用程序(和phpunit.xml文件)在VM上,但似乎PHPUnit引用了本地机器上的php.ini文件,因此从phpunit.xml设置配置选项会影响php。 VM中的ini文件,而不是我本地计算机上的文件。 但我不知道如何改变它。

我哪里出错了?


I'm trying to run PHPUnit tests, and need to change the short_open_tag php.ini setting to On.

Following the PHPUnit Manual, I have this in my phpunit.xml config file:

<phpunit>
    <php>
        <ini name='short_open_tag' value='On' />
    </php>

    ...
</phpunit>

But this doesn't override the setting in the php.ini file being used (which is set to 'Off'). If I go into that file and manually change the value to 'On', it works. But, I'd like to leave that setting alone and only change it for the PHPUnit tests.

My best guess: My application (and phpunit.xml file) is on a VM, but it appears that PHPUnit is referencing the php.ini file on my local machine, so setting the configuration option from the phpunit.xml is affecting the php.ini file in the VM and not on my local machine. But I'm not sure how to change that.

Where have I gone wrong?


原文:https://stackoverflow.com/questions/35277342
更新时间:2022-12-28 20:12

最满意答案

我只是需要添加

df$LATITUDE=as.numeric(as.character(df$LATITUDE))
df$LONGITUDE=as.numeric(as.character(df$LONGITUDE))
df$INDEX=as.numeric(as.character(df$INDEX))

并用'。'替换数据中的','


I just needed adding

df$LATITUDE=as.numeric(as.character(df$LATITUDE))
df$LONGITUDE=as.numeric(as.character(df$LONGITUDE))
df$INDEX=as.numeric(as.character(df$INDEX))

and replacing ',' in the data with '.'

相关问答

更多
  • 您缺少LocationListener,没有它,您的应用程序将无法接收位置更新。 Here is an excellent blog on GPS Location fetching.. http://blog.doityourselfandroid.com/2010/12/25/understanding-locationlistener-android/ You are missing the LocationListener without which your application cannot ...
  • 这里最简单的方法是弄清楚为什么GPS坐标首先混淆并纠正。 如果那是不可能的,我唯一能想到的就是迭代算法,它需要一个xy点并根据一些标准(例如距离,连续点的方向等)决定哪个点应该接下来。 沿着这些方向, import numpy as np from scipy.spatial.distance import pdist, squareform def find_gps_sorted(xy_coord, k0=0): """Find iteratively a continuous path fro ...
  • 你可以使用ggplot_build : ggplot_build(m + stat_density2d())$data[[2]] level x y piece group PANEL colour size linetype alpha 1 0.002 1.633788 40.00000 1 -1-001 1 #3366FF 0.5 1 NA 2 0.002 1.611111 40.11723 1 -1-001 1 ...
  • 试试这个,但请注意,这只是一个临时的解决方法,将来可能无法使用。 example <- data.frame(c(5,4,3),c(0.9,1.1,0.6)) colnames(example) <- c("r", "theta") is.linear.polar2 <- function(x) TRUE coord_polar2 <- coord_polar(theta="y", start = 3/2*pi, direction=-1) class(coord_polar2) <- c("pol ...
  • Here is an easy way to get the coordinates, //activity-main.xml
    代码几乎是好的。 我只做了一些小改动。 1.州名和省名需要在空间多边形数据框中完全匹配。 因此,州名的第一个字母必须是大写的。 而“魁北克”需要成为“魁北克”。 2.将longitude和latitude分别改为long和lat 。 us <- getData("GADM", country = "USA", level = 1) canada <- getData("GADM", country = "CAN", level = 1) states <- c('Connecticut', 'New Yor ...
  • 我只是需要添加 df$LATITUDE=as.numeric(as.character(df$LATITUDE)) df$LONGITUDE=as.numeric(as.character(df$LONGITUDE)) df$INDEX=as.numeric(as.character(df$INDEX)) 并用'。'替换数据中的',' I just needed adding df$LATITUDE=as.numeric(as.character(df$LATITUDE)) df$LONGITUDE=as ...
  • 你肯定在使用已投射数据的正确轨道上。 给这个镜头: ggplot(data_melt, aes(x=variable, y=value)) + geom_point(aes(color = time_group)) + facet_grid(facet_group ~ .) + geom_segment(data = data_cast, aes(x = variable, xend = variable, y = b ...
  • 正如我所提到的,我认为你应该简单地停止使用ggplot2 : g = ggplot(, aes(1:5)) foreach (i = 1:2) %do% { g <- g + geom_line(data = dd[[i]],aes(y = rates), colour="#000000") } g 这就产生了两行,就像你的第一个例子一样。 As I alluded to, I think you should simply stop using ggplot2 so strangely: g = g ...
  • 我能为一个能给出XY坐标的方程做些什么,这个方程具有足够的多样性来制作体面的图形渲染,而不是使用随机点? 找到边界框。 换句话说,找到列表中最小的x和最小的y坐标。 找到列表中最大的x和最大y坐标。 这两个点定义了边界框。 现在,将这些位置x,y坐标转换为绘制x,y坐标。 您的最小位置x,y坐标变为绘图坐标0,0。您的最大位置x,y坐标变为绘图坐标宽度,高度。 为了防止缩放使图像失真,我们必须首先计算x坐标和y坐标的缩放因子。 scaling factor x = drawing width / (loca ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)