Skip to content

Commit cfc1767

Browse files
author
Michele Orselli
committed
adds unit test for checking year on licence
1 parent ba09556 commit cfc1767

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 SendGrid, Inc.
3+
Copyright (c) 2012-2017 SendGrid, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

test/unit/LicenceYearTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace SendGrid\Test;
4+
5+
class LicenceYearTest extends \PHPUnit_Framework_TestCase
6+
{
7+
public function testConstructor()
8+
{
9+
$license = explode("\n", file_get_contents('./LICENSE.txt'));
10+
$copyright = $license[2];
11+
12+
$year = date('Y');
13+
14+
$expected = "Copyright (c) 2012-{$year} SendGrid, Inc.";
15+
16+
$this->assertEquals($expected, $copyright);
17+
}
18+
19+
}

0 commit comments

Comments
 (0)